<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
	div.fa{
		width: 100px;
		height: 50px;
		border: 1px solid #000;
	}

	p{
		color: red;
	}

	span{

		color: white;
		width: 25px;
		height: 25px;
		background-color: red;
		display: block;
		line-height: 25px;
		text-align: center;
		border-radius: 12px;
		position: absolute;
		right: 0px;
		top:-10px;
	
	}
	.fa{
		position: relative;
	}
	</style>
</head>
<body>
	<div class="fa">
		<p>我的购物车</p>
		<span>0</span>
	</div>
</body>
</html>